.#{$badge-prefix-cls} {
  display: inline-block;
  position: relative;

  &-count {
    background: $error-color;
    border: 1px solid transparent;
    border-radius: 10px;
    box-shadow: 0 0 0 1px #fff;
    color: #fff;
    font-family: 'Monospaced Number';
    font-size: 12px;
    height: 20px;
    line-height: 1;
    line-height: 18px;
    min-width: 20px;
    padding: 0 6px;
    position: absolute;
    right: 0;
    text-align: center;
    top: -10px;
    transform: translateX(50%);
    transform-origin: -10% center;
    vertical-align: middle;
    white-space: nowrap;
    z-index: 10;

    &-custom {
      background: transparent;
      border-color: transparent;
      box-shadow: none;
      color: inherit;
    }

    a,
    a:hover {
      color: #fff;
    }

    &-alone {
      display: block;
      position: relative;
      top: auto;
      transform: translateX(0);
    }

    &-primary {
      background: $primary-color;
    }

    &-success {
      background: $success-color;
    }

    &-error {
      background: $error-color;
    }

    &-warning {
      background: $warning-color;
    }

    &-info {
      background: $info-color;
    }

    &-normal {
      background: $normal-color;
      color: $subsidiary-color;
    }
  }

  &-dot {
    background: $error-color;
    border-radius: 100%;
    box-shadow: 0 0 0 1px #fff;
    height: 8px;
    position: absolute;
    right: -8px;
    top: -4px;
    transform: translateX(-50%);
    transform-origin: 0 center;
    width: 8px;
    z-index: 10;
  }

  &-status {
    @each $name, $colors in $colors-pallete {
      &-#{$name} {
        background-color: map-get($colors, '6');
      }
    }

    line-height: inherit;
    vertical-align: baseline;

    &-dot {
      border-radius: 50%;
      display: inline-block;
      height: 6px;
      position: relative;
      top: -1px;
      vertical-align: middle;
      width: 6px;
    }

    &-success {
      background-color: $success-color;
    }

    &-processing {
      background-color: $processing-color;
      position: relative;

      &::after {
        animation: aniStatusProcessing 1.2s infinite ease-in-out;
        border: 1px solid $processing-color;
        border-radius: 50%;
        content: '';
        height: 100%;
        left: 0;
        position: absolute;
        top: 0;
        width: 100%;
      }
    }

    &-default {
      background-color: $normal-color;
    }

    &-error {
      background-color: $error-color;
    }

    &-warning {
      background-color: $warning-color;
    }

    &-text {
      color: $text-color;
      display: inline-block;
      font-size: $font-size-base;
      margin-left: 6px;
    }
  }
}

@keyframes aniStatusProcessing {
  0% {
    opacity: 0.5;
    transform: scale(0.8);
  }

  100% {
    opacity: 0;
    transform: scale(2.4);
  }
}
